package org.utils.math;

/**
 * @author Manuel EVENO
 */
public class MathUtils
{
	/**
	 * Constructor for MathUtils.
	 */
	public MathUtils()
	{
		super();
	}
	
	public static double factoriel(int n)
	{
		if (n < 0)
			throw new IllegalArgumentException("Parameter must be a positive integer");
		double result = 1;
		for (int i = n; i > 0; i--)
			result *= i;
		return result;
	}
}
